<?php

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/

$factory->define(App\User::class, function (Faker\Generator $faker) {
    static $password;

    return [
        'name' => $faker->name,
        'email' => $faker->safeEmail,
        'password' => $password ?: $password = bcrypt('secret'),
        'remember_token' => str_random(10),
    ];
});
$factory->define(\App\Models\LessonsClassRoom::class, function (Faker\Generator $faker) {
    return [
        'default_img' => $faker->imageUrl(),
        'lessons_category_name' => $faker->lastName,
    ];
});
$factory->define(\App\Models\Lessons::class, function (Faker\Generator $faker) {
    return [
        'title' => $faker->title,
        'lessons_category_id' => $faker->numberBetween(1, 4),
        'video_url' => 'http://img.laohoulundao.com/video/20170719mimi.mp4',
        'looking_times' => $faker->numberBetween(0, 100),
        'user_id' => $faker->numberBetween(1, 999),
        'introduce' => $faker->paragraph(),
    ];
});
$factory->define(\App\Models\Comment::class, function (Faker\Generator $faker) {
    return [
        'user_id' => $faker->numberBetween(1, 999),
        'body' => $faker->paragraph(),
        'up_times' => rand(1, 99999),
        'lessons_id' => $faker->numberBetween(1, 30),
        'pid' => $faker->numberBetween(1, 999),
        'type' => $faker->numberBetween(1, 5),
    ];
});
$factory->define(\App\Models\CloMemberInfo::class, function (Faker\Generator $faker) {
    return [
        'user_id' => $faker->numberBetween(1, 999),
        'flower' => rand(1, 999),
        'introduce' => $faker->sentence(),
        'title' => $faker->paragraph(),
        'user_img' => $faker->imageUrl()
    ];
});
$factory->define(\App\Models\LessonCenter::class, function (Faker\Generator $faker) {
    return [
        'category_name' => $faker->lastName,
    ];
});
$factory->define(\App\Models\LearningOfficerMatter::class, function (Faker\Generator $faker) {
    return [
        'lessons_category_id' => $faker->numberBetween(1, 2),
        'title' => $faker->paragraph(),
        'article_img' => $faker->imageUrl(),
        'looking_times' => $faker->numberBetween(1, 88),
        'comment_times' => $faker->numberBetween(1, 88),
        'up_times' => 88,
        'auther' => $faker->firstName
    ];
});
$factory->define(\App\Models\LessonCenterNotice::class, function (Faker\Generator $faker) {
    return [
        'type' => $faker->numberBetween(0, 1),
        'title' => $faker->paragraph(),
        'notice_id' => $faker->numberBetween(1, 999),
        'notice_img' => $faker->imageUrl()
    ];
});